<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="box">
			<h1 v-if="show">这是一段h1的文本</h1>
			<button @click="hidden_h1" type="button">点击隐藏</button>
			<button @click="show_h1" type="button">点击显示</button>
		</div>
		<script type="text/javascript">
			new Vue(
				{
					el:'#box',
					data:{
						show:true
					},
					methods:{
						hidden_h1:function(){
							this.show=false
						},
						show_h1:function(){
							this.show=true;
						}
					}
				}
			);
		</script>
	</body>
</html>
